<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>Insert title here</title>
</head>
<body>
	<%-- ${results[0].ITEMIDX} --%>
	
	<table border="1">
		<tr>
			<td>아이템 순번</td>
			<td>${results.itemidx}</td>
		</tr>
		<tr id="pic">
			<td>사진</td>
			<td>
				<img src="images/${results.photopath}">
			</td>
			<%-- <td>
				<!-- <img src="images/ksic.gif"> -->
				<img src="images/" + "${results.photopath}">
			</td> --%>
		</tr>
		<tr>
			<td>등록일자</td>
			<td>${results.stdate}</td>
		</tr>
	</table>
	<input type="button" onclick="rrr();">
</body>

<script type="text/javascript">
	 
	window.onload = function() {
		var path = '${results.photopath}';
		document.getElementById("pic").innerHTML = '<td>사진</td><td><img src="images/${results.photopath}"></td>';
	};
	 
	function rrr() {
		var path = '${results.photopath}';
		document.getElementById("pic").innerHTML = '<td>사진</td><td><img src="images/${results.photopath}"></td>';
	}
</script>

</html>